package com.bstek.urule.accident.action;

import org.springframework.stereotype.Component;

import com.bstek.urule.model.library.action.annotation.ActionBean;
import com.bstek.urule.model.library.action.annotation.ActionMethod;
import com.bstek.urule.model.library.action.annotation.ActionMethodParameter;

@Component
@ActionBean(name = "字符串与数字")
public class StringIntegerUtils {

	@ActionMethod(name = "判断是否为数字")
	@ActionMethodParameter(names = {"目标字符串"})
	public boolean checkIsNumber(String str) {
		try {
			Double.parseDouble(str);
		} catch(Exception e) {
			return false;
		}
		return true;
	} 
	
}